import Vue from 'vue'
import { initMessage } from '@/utils'
import {
  Button,
  Input,
  Rate,
  Image,
  Select,
  Checkbox,
  Option,
  Progress,
  Table,
  TableColumn,
  Tree,
  Radio,
  RadioGroup,
  Loading,
  Message,
  MessageBox,
  Upload,
  Popover,
  Empty,
  DatePicker
} from 'element-ui'

Vue.use(Button)
Vue.use(Input)
Vue.use(Rate)
Vue.use(Image)
Vue.use(Select)
Vue.use(Option)
Vue.use(Checkbox)
Vue.use(Progress)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tree)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Upload)
Vue.use(Popover)
Vue.use(Empty)
Vue.use(DatePicker)

Vue.prototype.$loading = Loading.service
Vue.prototype.$msgbox = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$message = initMessage.call(this, Message)
